package com.wlyuan.open.scanner.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wlyuan.open.scanner.constant.Constants;
import com.wlyuan.open.scanner.domain.order.OrderAttach;
import com.wlyuan.open.scanner.domain.order.OrderGoods;
import com.wlyuan.open.scanner.domain.order.OrderTransport;
import com.wlyuan.open.scanner.domain.quotation.SurchargeFee;
import com.wlyuan.open.scanner.domain.transport.TransportAttach;
import com.wlyuan.open.scanner.utils.DateUtils;
import com.wlyuan.open.scanner.utils.enums.named.TransportModeEnum;
import com.wlyuan.open.scanner.utils.enums.order.OrderStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.CollectionUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
 * <p>
 *
 * </p>
 *
 * @author yuanjie
 * @since 2022-10-14
 */
@Data
@TableName("TMS_OrderIndex")
@ApiModel(value = "OrderindexDO对象", description = "")
public class OrderIndexDO implements Serializable {


    private static final long serialVersionUID = 3467721078370487346L;
    @ApiModelProperty("订单id")
    @TableId(value = "Index_ID", type = IdType.AUTO)
    private Long indexId;

    @ApiModelProperty("单据编号")
    private String indexCode;

    @ApiModelProperty("合同编号")
    private String indexPactcode;

    @ApiModelProperty("订单类型，1 客户订单 2 运输订单 3 拼车单")
    private Long indexSrcclass;

    @ApiModelProperty("客户编号")
    private Long indexCustomerid;

    @ApiModelProperty("客户名字")
    private String indexCustomername;

    @ApiModelProperty("客户类型")
    @TableField(exist = false)
    private Integer customerType;
    @ApiModelProperty("客户名称")
    @TableField(exist = false)
    private String customerName;
    @TableField(exist = false)
    @ApiModelProperty("bill-对账单状态")
    private Integer customerFinanceStatus;

    @ApiModelProperty("收货人编号(ID)")
    private Long indexEnduserid;

    @ApiModelProperty("收货人名称")
    private String indexEndusername;

    @ApiModelProperty("发货联系人ID")
    private Integer indexFrommanid;

    @ApiModelProperty("发货联系人")
    private String indexFromman;

    @ApiModelProperty("发货地址")
    private String indexFrom;

    @ApiModelProperty("发货省")
    private Long indexFromprovince;

    @TableField(exist = false)
    private String fromProvinceName;

    @ApiModelProperty("发货市")
    private Long indexFromcity;

    @TableField(exist = false)
    private String fromCityName;

    @ApiModelProperty("发货区")
    private Long indexFromdistrict;

    @TableField(exist = false)
    private String fromDistrictName;

    @ApiModelProperty("发货时间")
    private LocalDateTime indexFromtime;

    @ApiModelProperty("收货联系人编号")
    private Integer indexTomanid;

    @ApiModelProperty("收货联系人")
    private String indexToman;

    @ApiModelProperty("收货地址")
    private String indexTo;

    @ApiModelProperty("收货省")
    private Long indexToprovince;

    @TableField(exist = false)
    private String toProvinceName;

    @ApiModelProperty("收货市")
    private Long indexTocity;

    @TableField(exist = false)
    private String toCityName;

    @ApiModelProperty("收货区")
    private Long indexTodistrict;

    @TableField(exist = false)
    private String toDistrictName;

    @ApiModelProperty("收货时间")
    private LocalDateTime indexTotime;

    @ApiModelProperty("运输模式：1 零担 2 整车 3 空运 4 快递 5 铁路 6 海运")
    private Integer indexTransportmode;

    @ApiModelProperty("货物分类：1 普通货物 、2 危险品 、4 温控获取;允许使用or")
    private Long indexGoodscategory;

    @ApiModelProperty("包装方式：1 散箱(可堆叠，人工装卸) 2 托盘或木箱(可堆叠，叉车装卸) 3 托盘、木箱或不规则形状，不可堆叠，叉车装卸")
    private Long indexPackagemode;

    @ApiModelProperty("计费模式：1 体积 2 重量 3数量")
    private Long indexChargemode;

    @ApiModelProperty("计价单位：1 吨 2 公斤 3 立方 4 其他")
    private Long indexPriceunit;

    @ApiModelProperty("订单状态,-1草稿,0新单据,1待调度, 2待签收,4待回单,8已回单,32已关闭")
    private Integer indexStatus;

    @ApiModelProperty("订单状态修改时间")
    private LocalDateTime indexStatustime;

    @ApiModelProperty("来源订单")
    private Long indexSrcorderid;

    @ApiModelProperty("原始单据编号（起始订单）")
    private Long indexRootorderid;

    @ApiModelProperty("公里数")
    private Long indexKms;

    @ApiModelProperty("车型")
    private Integer indexCartype;

    @ApiModelProperty("车长（米）")
    private Double indexCarlength;

    @ApiModelProperty("司机编号")
    private Long indexDriverid;

    @ApiModelProperty("车辆编号")
    private Long indexCarid;

    @ApiModelProperty("承运方编号")
    private Long indexSupplierid;

    @ApiModelProperty("承运方公司编号")
    private Long indexSuppliercompanyid;

    @ApiModelProperty("客户公司编号")
    private Long indexCustomercompanyid;

    @ApiModelProperty("运输模式, 1 市内 2 长途")
    private Long indexShipmode;

    @ApiModelProperty("是否提货")
    private Long indexPick;

    @ApiModelProperty("是否送货")
    private Long indexDelivery;

    @ApiModelProperty("制单人（下单人）")
    private Long indexCreator;

    @ApiModelProperty("下单人所属公司")
    private Long indexCreatorcompanyid;

    @ApiModelProperty("制单时间（下单时间）")
    private LocalDateTime indexCreatetime;

    @ApiModelProperty("审核(或接受)人")
    private Long indexConfirmer;

    @ApiModelProperty("审核(或接收)时间")
    private LocalDateTime indexConfirmtime;

    @ApiModelProperty("签收单据图片路径")
    private String indexReceiptdoc;

    @ApiModelProperty("异常描述")
    private String indexException;

    @ApiModelProperty("是否有效")
    private Integer indexInvalid;

    @ApiModelProperty("备注")
    private String indexComments;

    @ApiModelProperty("装货")
    private Long indexOnload;

    @ApiModelProperty("卸货")
    private Long indexOffload;

    @ApiModelProperty("保价")
    private Long indexInsurance;

    @ApiModelProperty("体积补差")
    private BigDecimal indexVolumeaddition;

    @ApiModelProperty("重量补差")
    private BigDecimal indexWeightaddition;

    @ApiModelProperty("描叙")
    private String indexDescription;

    @ApiModelProperty("车体积")
    private BigDecimal indexCarvolume;

    @ApiModelProperty("车重量")
    private BigDecimal indexCarweight;

    @ApiModelProperty("是否拼车")
    private Integer indexCombined;

    @ApiModelProperty("线下客户")
    private Long indexCustomersymbolid;

    @ApiModelProperty("线下承运商")
    private Long indexSuppliersymbolid;

    @ApiModelProperty("刷实际出发时间，标记类型")
    private String indexReceiptdoc1;

    @ApiModelProperty("报价系统中标识不能操作的订单")
    private String indexReceiptdoc2;

    @ApiModelProperty("刷实际出发时间的备份")
    private String indexReceiptdoc3;

    @ApiModelProperty("发货方联系电话")
    private String indexFromcontact;

    @ApiModelProperty("收货方联系电话")
    private String indexTocontact;

    @ApiModelProperty("总价值（物品价值）")
    private BigDecimal indexGoodsvalue;

    @ApiModelProperty("拆单ID")
    private Long indexPrevorderid;

    @ApiModelProperty("设备号码")
    private String indexDevicecode;

    @ApiModelProperty("预付")
    private BigDecimal indexPayment;

    @ApiModelProperty("到付")
    private BigDecimal indexPayable;

    @ApiModelProperty("物品列表")
    private String indexGoodslst;

    @ApiModelProperty("实际出发时间")
    private LocalDateTime indexRealfromtime;

    @ApiModelProperty("实际到达时间")
    private LocalDateTime indexRealtotime;

    @ApiModelProperty("电子回单暂时记录发货地址简写及楼层(用于提供给用户选择)")
    private String indexReceiptdoc4;

    @ApiModelProperty("电子回单暂时记录收货地址简写及楼层(用于提供给用户选择)")
    private String indexReceiptdoc5;

    @ApiModelProperty("快递编码")
    private String indexReceiptdoc6;

    @ApiModelProperty("撤回")
    private Integer indexRollback;

    @ApiModelProperty("对接操作人")
    private String indexFromoperator;

    @ApiModelProperty("对接ID")
    private Long indexTerminalorderid;

    @ApiModelProperty("对接编号")
    private String indexTerminalordercode;

    @ApiModelProperty("承运商名字")
    private String indexSuppliername;

    @ApiModelProperty("所属公司")
    private String indexCreatorcompanyname;

    @ApiModelProperty("线下客户名字")
    private String indexCustomersymbolname;

    @ApiModelProperty("线下承运商")
    private String indexSuppliersymbolname;

    @ApiModelProperty("运费总金额")
    private BigDecimal indexTotalcost;

    @ApiModelProperty("总数量")
    private BigDecimal indexTotalamount;

    @ApiModelProperty("总重量")
    private BigDecimal indexTotalweight;

    @ApiModelProperty("总体积")
    private BigDecimal indexTotalvolume;

    @ApiModelProperty("拼车物品数量")
    private BigDecimal indexCombinedamount;

    @ApiModelProperty("拼车总费用")
    private BigDecimal indexCombinedcost;

    @ApiModelProperty("拼车体积")
    private Double indexCombinedweight;

    @ApiModelProperty("拼车重量")
    private Double indexCombinedvolume;

    @ApiModelProperty("拼车订单数")
    private Long indexCombinedorderamount;

    @ApiModelProperty("拼车出发地")
    private String indexCombinedfrom;

    @ApiModelProperty("拼车目的地")
    private String indexCombinedto;

    @ApiModelProperty("运输缓存已就绪")
    private Integer indexTcacheready;

    @ApiModelProperty("出发短信时间")
    private LocalDateTime indexStartmsgtime;

    @ApiModelProperty("预计达到时间")
    private LocalDateTime indexArrivemsgtime;

    @ApiModelProperty("电子回单验证码")
    private String indexVerifycode;

    @ApiModelProperty("设备绑定时间")
    private LocalDateTime indexDevicecreattime;

    @ApiModelProperty("GPS开始时间")
    private LocalDateTime indexGpsstarttime;

    @ApiModelProperty("设备绑定时间")
    private LocalDateTime indexDevicebindingtime;

    @ApiModelProperty("出发坐标")
    private String indexFromlocation;

    @ApiModelProperty("到达坐标")
    private String indexTolocation;

    @ApiModelProperty("拼车单计算关账日时间")
    private LocalDateTime indexContainsbillday;

    @ApiModelProperty("设备类型 1 电子回单 2 快递")
    private Integer indexTracktype;

    @ApiModelProperty("承运商类型 1 线上 2 线下 3 自营 4线上-个体")
    private Integer indexSuppliertype;

    @ApiModelProperty("撤销订单")
    private Integer indexCusrollback;

    @ApiModelProperty("出发地:1 精确坐标 0 大概坐标")
    private Integer indexFromtype;

    @ApiModelProperty("目的地 1 精确坐标 0 大概坐标")
    private Integer indexTotype;

    @ApiModelProperty("撤销订单ID")
    private Long indexRollbackorderid;

    @ApiModelProperty("脱普辅助物打印(什么叫辅助物不知道)")
    private String indexTpprint;

    @ApiModelProperty("异常签收情况分类 0 无异常 1 缺少 2 丢失 4 破损 8 其他（作废）")
    private Integer indexExceptiontype;

    @ApiModelProperty("订单打分满分5分")
    private Integer indexAssesslevel;

    @ApiModelProperty("打分说明")
    private String indexAssessment;

    @ApiModelProperty("关闭订单标记 0 无关闭订单,1 客服发起关闭订单,2 运营发起关闭订单,3 运营关闭订单通知,4 客服关闭订单通知,5、客服发起拼车单关闭订单,6、已关闭订单,7、运营发起拼车单关闭订单,8、本方客服关闭订单通知")
    private Integer indexClosemark;

    @ApiModelProperty("关单备注")
    private String indexClosement;

    @ApiModelProperty("是否带单 0 否 1是")
    private Integer indexAddorder;

    @ApiModelProperty("附属主单合同号 ")
    private String indexAddpacth;

    @ApiModelProperty("整车车数 默认1 ")
    private Integer indexCarcount;

    @ApiModelProperty("是否自动调度 0 否 1 是")
    private Integer indexAutoschedule;

    @ApiModelProperty("拼车是否匹配合约")
    private Integer indexCombineprice;

    @ApiModelProperty("订单关系 0 普通单 1 主单 2 从单")
    private Integer indexOrdertype;

    @ApiModelProperty("是否拆单、拆单类型")
    private Integer indexBesplit;

    @ApiModelProperty("1 线路拆单 2 数量拆单")
    private Integer indexSplittype;

    @ApiModelProperty("电子回单暂时用于存放发货市")
    private String indexReceiptdoc8;

    @ApiModelProperty("电子回单暂时用于存放到货市")
    private String indexReceiptdoc9;

    @ApiModelProperty("关单发起人")
    private String indexCloseinitiator;

    @ApiModelProperty("关单类型，1、订单错误 2、调度错误")
    private Long indexClosetype;

    @ApiModelProperty("签收扩展类型")
    private Integer indexSigninfotype;

    @ApiModelProperty("签收扩展信息")
    private String indexSigninfo;

    @ApiModelProperty("个体司机已关闭拼车单的子单")
    private String indexRollbcklst;

    @ApiModelProperty("创建订单类型 0 PC平台手动创建 1  移动端创建，2 预发货  3订单导入  4 新api对接  5加加同步订单 6起帆同步订单  9电子回单创建")
    private Integer indexCreatetype;

    @ApiModelProperty("异常回单类型 0 无 1 补单  2丢单")
    private Integer indexReceipttype;

    @ApiModelProperty("0 无 1 飞机 2 火车 3 轮船")
    private String indexAdditiontransporttype;

    @ApiModelProperty("0 零担带单 1 整车带单")
    private Integer indexWithchildtype;

    @ApiModelProperty("补录设备编号")
    private String indexDevicecode2;

    @ApiModelProperty("订单总距离 公里")
    private Double indexDistance;

    @ApiModelProperty("第四种已发货 0提货中 1已发货")
    private Integer indexRealfromstatus;

    @ApiModelProperty("分段绑定电子回单途径地暂存")
    private String indexDevicebindinglog;

    @ApiModelProperty("是否分段绑定 0普通绑定 1分段绑定")
    private Integer indexDevicebindingpart;

    @ApiModelProperty("临时测试出发时间使用")
    private LocalDateTime indexTest;

    @ApiModelProperty("验证码生成时间")
    @TableField(exist = false)
    private LocalDateTime codeTime;

    @ApiModelProperty("客户通过下单时填写的信息，物流源只存储，暂不做业务逻辑处理")
    private String indexEcho;

    private Integer optStatus;

    private String indexReceiptdoc7;

    private String indexGuid;

    @TableField(exist = false)
    private Integer days;

    @ApiModelProperty("运单订单租户")
    @TableField(exist = false)
    private Long orderTenantId;
    @ApiModelProperty("运单订单客户")
    @TableField(exist = false)
    private Long orderCustomerId;
    @ApiModelProperty("运单订单客户类型")
    @TableField(exist = false)
    private Integer orderCustomerType;
    @ApiModelProperty("运单订单客户名称")
    @TableField(exist = false)
    private String orderCustomerName;
    @ApiModelProperty("运单订单创建人")
    @TableField(exist = false)
    private Long orderCreateBy;

    @ApiModelProperty("价值补差")
    @TableField(exist = false)
    private BigDecimal valueAddition;

    @ApiModelProperty("制单人描述")
    @TableField(exist = false)
    private String createManDesc;

    @ApiModelProperty("是否生成场景证书（0：否，1：是）")
    @TableField(exist = false)
    private Integer generateCert;

    @ApiModelProperty("实签总数")
    @TableField(exist = false)
    private Integer signQuantity;
    @ApiModelProperty("异签总数")
    @TableField(exist = false)
    private Integer signExceptionQuantity;

    @ApiModelProperty("调度人")
    @TableField(exist = false)
    private Long dispatchBy;
    @ApiModelProperty("调度时间")
    @TableField(exist = false)
    private LocalDateTime dispatchAt;

    @ApiModelProperty("签收类型")
    @TableField(exist = false)
    private Integer signType;
    @ApiModelProperty("签收租户id")
    @TableField(exist = false)
    private Long signTenant;
    @ApiModelProperty("签收说明")
    @TableField(exist = false)
    private String signDesc;
    @TableField(exist = false)
    private Long signFlowId;
    @ApiModelProperty("签收人")
    private Long indexSinger;
    @ApiModelProperty("签收时间")
    private LocalDateTime indexSigntime;
    @ApiModelProperty("复核签收时间")
    private LocalDateTime indexVerifysigintime;
    @ApiModelProperty("签收操作时间")
    @TableField(exist = false)
    private LocalDateTime signCreateTime;

    @ApiModelProperty("回单操作人")
    @TableField(exist = false)
    private Long receiptBy;
    @ApiModelProperty("回单类型")
    @TableField(exist = false)
    private Integer receiptType;
    @ApiModelProperty("回单标记")
    @TableField(exist = false)
    private Integer receiptLabel;
    @ApiModelProperty("回单总数")
    @TableField(exist = false)
    private Integer receiptQuantity;
    @ApiModelProperty("回单异常总数")
    @TableField(exist = false)
    private Integer receiptExceptionQuantity;
    @ApiModelProperty("回单说明")
    @TableField(exist = false)
    private String receiptDesc;
    @ApiModelProperty("回单租户id")
    @TableField(exist = false)
    private Long receiptTenant;
    @TableField(exist = false)
    private Long receiptFlowId;
    @ApiModelProperty("回单时间")
    private LocalDateTime indexReceiptime;
    @ApiModelProperty("回单创建时间")
    @TableField(exist = false)
    private LocalDateTime receiptCreateTime;
    @ApiModelProperty("回单复核 0 无 1 复核")
    @TableField(exist = false)
    private Integer receiptReview;

    @ApiModelProperty("关单时间")
    @TableField(exist = false)
    private LocalDateTime closeAt;
    @ApiModelProperty("关单操作人")
    @TableField(exist = false)
    private Long closeBy;
    @ApiModelProperty("关单租户id")
    @TableField(exist = false)
    private Long closeTenant;
    @ApiModelProperty("拒绝原因")
    @TableField(exist = false)
    private String refuseReason;
    @ApiModelProperty("关闭原因")
    @TableField(exist = false)
    private String closeReason;
    @ApiModelProperty("审核租户")
    @TableField(exist = false)
    private Long closeToTenantId;
    @ApiModelProperty("拒绝时间")
    @TableField(exist = false)
    private LocalDateTime refuseAt;
    @ApiModelProperty("拒绝人")
    @TableField(exist = false)
    private Long refuseBy;
    @ApiModelProperty("关单租户id")
    @TableField(exist = false)
    private Long refuseTenant;
    @ApiModelProperty("关闭状态")
    @TableField(exist = false)
    private Integer closeStatus;
    @TableField(exist = false)
    private Long closeFlowId;
    @TableField(exist = false)
    private Long refuseFlowId;

    @ApiModelProperty("拼车单主单")
    @TableField(exist = false)
    private Long ownerCombinedOrderId;
    @TableField(exist = false)
    @ApiModelProperty(value = "拼车单主单合同号")
    private String combinedOrderPactCode;


    @TableField(exist = false)
    @ApiModelProperty("承运商名称")
    private String carrierName;
    @TableField(exist = false)
    @ApiModelProperty("承运商电话")
    private String carrierPhone;
    @TableField(exist = false)
    @ApiModelProperty("承运商联系人")
    private String carrierContactName;
    @TableField(exist = false)
    @ApiModelProperty("承运商id")
    private Long carrierId;
    @TableField(exist = false)
    @ApiModelProperty("承运商类型")
    private Integer carrierType;
    @TableField(exist = false)
    @ApiModelProperty("bill-对账单状态")
    private Integer carrierFinanceStatus;

    @TableField(exist = false)
    @ApiModelProperty("上游运单id")
    private Long upTransportId;
    @TableField(exist = false)
    @ApiModelProperty("运单类型")
    private Integer transportType;
    @TableField(exist = false)
    @ApiModelProperty("运单状态")
    private Integer transportStatus;
    @TableField(exist = false)
    @ApiModelProperty("拼车单状态")
    private Integer combineStatus;

    @ApiModelProperty("订单附件信息")
    @TableField(exist = false)
    private List<OrderAttach> attachment;
    @ApiModelProperty("运单附件信息")
    @TableField(exist = false)
    private List<TransportAttach> attachments;
    @ApiModelProperty("订单物品信息")
    @TableField(exist = false)
    private List<OrderGoods> goodsList;
    @ApiModelProperty("订单交通信息")
    @TableField(exist = false)
    private List<OrderTransport> transports;

    @ApiModelProperty("拼车单子单集合")
    @TableField(exist = false)
    private List<Long> childrenTransportIds;

    @ApiModelProperty("零担费")
    @TableField(exist = false)
    private BigDecimal lessCost;
    @ApiModelProperty("整车费")
    @TableField(exist = false)
    private BigDecimal fullCost;
    @ApiModelProperty("提货费")
    @TableField(exist = false)
    private BigDecimal pickCost;
    @ApiModelProperty("送货费")
    @TableField(exist = false)
    private BigDecimal deliveryCost;
    @ApiModelProperty("装货费")
    @TableField(exist = false)
    private BigDecimal onLoadCost;
    @ApiModelProperty("卸货费")
    @TableField(exist = false)
    private BigDecimal offLoadCost;
    @ApiModelProperty("保险费")
    @TableField(exist = false)
    private BigDecimal insuranceCost;
    @ApiModelProperty("税费")
    @TableField(exist = false)
    private BigDecimal taxCost;
    @ApiModelProperty("附加费")
    @TableField(exist = false)
    private BigDecimal additionCost;
    @ApiModelProperty("预付款")
    @TableField(exist = false)
    private BigDecimal payment;
    @ApiModelProperty("货到付款")
    @TableField(exist = false)
    private BigDecimal payable;
    @ApiModelProperty("代收货款")
    @TableField(exist = false)
    private BigDecimal paysub;
    @ApiModelProperty("总费用")
    @TableField(exist = false)
    private BigDecimal totalCost;
    @ApiModelProperty("最小费用")
    @TableField(exist = false)
    private BigDecimal minCost;
    @ApiModelProperty("回执费用")
    @TableField(exist = false)
    private BigDecimal receiptFee;
    @ApiModelProperty("异常费")
    @TableField(exist = false)
    private BigDecimal exceptionFee;
    @ApiModelProperty("是否合约匹配 1是，0否")
    @TableField(exist = false)
    private Integer matched;
    @ApiModelProperty("是否重算：1是，0否")
    @TableField(exist = false)
    private Integer refreshPrice;
    @TableField(exist = false)
    private Long docId;
    @ApiModelProperty("合约模板ID")
    @TableField(exist = false)
    private Long templateId;
    @ApiModelProperty("补充费用明细")
    @TableField(exist = false)
    private List<SurchargeFee> surchargeFees;
    @ApiModelProperty("是否有报价")
    @TableField(exist = false)
    private boolean quotation;
    @ApiModelProperty("报价-附加费(代表按单报价中的附加费)")
    @TableField(exist = false)
    private BigDecimal quoteSurchargeFee;

    @ApiModelProperty("异常状态")
    @TableField(exist = false)
    private Set<Integer> exceptionStatus;
    @TableField(exist = false)
    private String raw;

    @ApiModelProperty("上游租户")
    @TableField(exist = false)
    private Long upTenantId;
    @ApiModelProperty("下游租户")
    @TableField(exist = false)
    private Long downTenantId;

    @ApiModelProperty("运单财务状态")
    @TableField(exist = false)
    private Integer financeStatus;
    @TableField(exist = false)
    @ApiModelProperty("预付款已操作 1：已收、2已付、3已收已付")
    private Integer prepayFeeFlag;
    @TableField(exist = false)
    @ApiModelProperty("到付款已操作 1：已收、2已付、3已收已付")
    private Integer arrivePayFeeFlag;
    @TableField(exist = false)
    @ApiModelProperty("代收款已操作 1：已收、2已付、3已收已付")
    private Integer collectionFeeFlag;
    @ApiModelProperty("回单与签收一致")
    @TableField(exist = false)
    private boolean signToReceipt;

    @ApiModelProperty("延期原因")
    @TableField(exist = false)
    private Integer delayReason;


    public void addException(Integer status) {
        if (CollectionUtils.isEmpty(exceptionStatus)) {
            exceptionStatus = new LinkedHashSet<>();
        }
        this.exceptionStatus.add(status);
    }

    public boolean isReceipt() {
        //回单时间不为空，则为已回单
        return DateUtils.dateTimeDefaultToNull(this.indexReceiptime) != null;
    }

    public boolean isSign() {
        //签收人不为空， 则为已签收
        return this.indexSigntime != null && !Constants.YEAR.equals(this.indexSigntime.getYear());
    }

    public boolean isClose() {
        //状态为关闭，则为已关闭
        return OrderStatusEnum.isClose(this.indexStatus);
    }

    public boolean isScore() {
        return this.indexAssesslevel != null && this.indexAssesslevel > 0;
    }

    public boolean isVehicle() {
        return TransportModeEnum.FULL.getValue().equals(this.indexTransportmode);
    }

    public boolean isAdditionTransportType() {
        return this.indexAdditiontransporttype != null && !"0".equals(this.indexAdditiontransporttype);
    }
}
